package com.laolang.shop.modules.sys.web.admin;

import com.laolang.shop.common.core.domain.SimpleAjax;
import com.laolang.shop.modules.auth.util.SecurityUtil;
import com.laolang.shop.modules.sys.logic.admin.SysUserAdminLogic;
import com.laolang.shop.modules.sys.pojo.vo.SysUserInfoVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author khlbat
 * @version 1.0
 * @date 2020/11/1 20:46
 */
@RequestMapping("admin/sysuser")
@RestController
public class SysUserAdminController {

    @Autowired
    private SysUserAdminLogic sysUserAdminLogic;

    @GetMapping("info")
    public SimpleAjax<SysUserInfoVo> info() {
        return SimpleAjax.ok(sysUserAdminLogic.info(SecurityUtil.getUserId()));
    }
}
